#include <atomic>
#include <cstring>
#include <iostream>
#include <pthread.h>
#include <thread>

using namespace std;

#include <iostream>

class Base
{
public:
    Base() { std::cout << "Base constructor" << std::endl; }
    ~Base() { std::cout << "Base destructor" << std::endl; }
};

class Base1
{
public:
    Base1() { std::cout << "Base1 constructor" << std::endl; }
    ~Base1() { std::cout << "Base1 destructor" << std::endl; }
};

class Base2
{
public:
    Base2() { std::cout << "Base2 constructor" << std::endl; }
    ~Base2() { std::cout << "Base2 destructor" << std::endl; }
};

class Base3
{
public:
    Base3() { std::cout << "Base3 constructor" << std::endl; }
    ~Base3() { std::cout << "Base3 destructor" << std::endl; }
};

class MyClass
    : public virtual Base3
    , public Base1
    , public virtual Base2
{
public:
    MyClass() : num1( 1 ), num2( 2 ) { std::cout << "MyClass constructor" << std::endl; }
    ~MyClass() { std::cout << "MyClass destructor" << std::endl; }

private:
    int num1;
    int num2;
    // 这个是为了看成员变量的初始化顺序
    Base base;
};

int main()
{
    MyClass obj;
    return 0;
}